/*
 *暑期JAVA学习 版权所有 2022-2025 
 */
package com.ychs.corejava.lesson4;

import org.omg.CosNaming.NamingContextExtPackage.AddressHelper;

/**
 *引用数据类型示例（复合数据类型）
 * @author  menlu
 * @version 1.0
 */
public class Person {
	private String name;
	private int age;
	
	public void change(Address addr) {
//		addr = new Address("大同","长治","临汾");
		addr.setHomeAddr("忻州");
		addr.setHomeAddr("北京");
	}
	
	public static void main(String[] args) {
		int salary = 100 ;
		Address addr1 = new Address("太原","西安","重庆");
		Address addr2 = addr1;
//		addr1 = new Address("大同","长治","临汾");
		
		Person person = new Person();
		person.change(addr1);
		System.out.println(addr1.getHomeAddr());
		System.out.println(addr1.getSchoolAddr());
	}
}